package com.lapck.car1;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Display;
import android.widget.FrameLayout;
import android.widget.TextView;

public class Car1Activity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        FrameLayout main = (FrameLayout) findViewById(R.id.main_view);
        Display d1 = getWindowManager().getDefaultDisplay();
        Log.v("Msg", "Width="+d1.getWidth()+"Height="+d1.getHeight());
       
        figura1 figura = new figura1(this,d1.getWidth()/2,d1.getHeight()/2,40);
        figura.setTextView((TextView) findViewById(R.id.textView1));

        Pista pista1 = new Pista(this,R.drawable.plano2,d1.getWidth()/2,d1.getHeight()/2);
        figura.setPista(pista1);       
        main.addView(pista1);
        main.addView(figura);
        
    }
}